All Questions
9 questions
3votes
1answer
86views
Simulate M random walkers N times and visualize relationship between walker number and grid size
Problem statement: Suppose that n random walkers, starting in the center of an n-by-n grid, move one step at a time, choosing to go left, right, up, or down with equal probability at each step. Write ...
2votes
1answer
159views
Card game simulations, with a multithreaded version slower than the single-threaded one
I'm new to rust and I'm trying to build a card game simulation to find all of the best actions with all possible hands. This requires a lot of simulations and my first 3 million are already taking a ...
6votes
1answer
187views
Rust based Sudoku solver using backtracking
I've just started learning rust and have written a basic sudoku solver, however it seems to run much slower than I expected. So I'm looking for any possible performance improvements as well as any ...
4votes
1answer
123views
Sanitize and build data structure from Consul configuration
I have a piece of working code that takes some strings from Consul configuration exports, sanitizes them a little and converts them into valid json and/or hocon structures. While I am iterating over ...
6votes
0answers
304views
Generating integer partitions
I've tried to implement integer partition algorithm as described in blogpost below (author implemented it in Python): Generating integer partitions I'm still trying to learn best practices in ...
4votes
0answers
472views
Move-generation for chess in rust
In the last couple of days I have been programming a chess move generator in Rust from scratch. While it's intent is to be later used in a fully functional engine, where the speed of the move-...
1vote
1answer
3kviews
Greedy Best First Search implementation in Rust
I have implemented a Greedy Best First Search algorithm in Rust, since I couldn't find an already implemented one in the existing crates. I have a small pet project I do in Rust, and the Greedy BFS is ...
3votes
1answer
87views
Generating an image with all 15-bit colors, each used exactly once
I've blatantly copied fejesjoco's solotion to this codegolf into Rust, and was hoping for some feedback. Basically, it begins by generating a vector containing every possible 15-bit RGB color, and ...
3votes
1answer
394views
Rust sorting algorithms (selection, bubble, quick, shell, merge)
I have written some sorting algorithms in Rust and wanted to see how terrible they were. What I am looking for: Bugs Performance improvements Idiomatic code Maybe even a functional approach to the ...